
public class StackEntry {

	private SymbolTable tablePointer = null;
	private int offset = 0;
	
	public StackEntry() {
		super();
	}
	
	public StackEntry(SymbolTable tablePointer) {
		this();
		this.tablePointer = tablePointer;
	}
	
	public StackEntry(SymbolTable tablePointer, int offset) {
		this(tablePointer);
		this.offset = offset;
	}

	public SymbolTable getTablePointer() {
		return this.tablePointer;
	}

	public int getOffset() {
		return this.offset;
	}

	public void setTablePointer(SymbolTable tablePointer) {
		if(tablePointer != null)
			this.tablePointer = tablePointer;
	}

	public void setOffset(int offset) {
		if(offset >= 0)
			this.offset = offset;
	}
	
	public void incrementOffsetByValue(int value) {
		if(value >= 0)
			this.offset += value;
	}
}
